<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>BOM对象模型</title>
</head>
<body>
    <script>
        var str = "host:";
        str += window.location.host;
        str += "<br>";

        str += "hostname:";
        str += window.location.hostname;
        str += "<br>";

        str += "href:";
        str += window.location.href;
        str += "<br>";

        str += "pathname:";
        str += window.location.pathname;
        str += "<br>";

        str += "port:";
        str += window.location.port;
        str += "<br>";

        str += "protocol:";
        str += window.location.protocol;
        str += "<br><hr>";

        str += "status:";
        str += window.status;
        str += "<br><hr>";

        document.write(str);
    </script>
</body>
</html>